libostree: Ensure we set standard::type when querying files
authorColin Walters <walters@verbum.org>
Sun, 19 Jan 2014 18:18:04 +0000 (13:18 -0500)
committerColin Walters <walters@verbum.org>
Sun, 19 Jan 2014 18:19:10 +0000 (13:19 -0500)
This makes the obvious code to recursively enumerate directories
operate more sanely.

Noticed this while trying to write corrupt-repo-ref.js.

src/libostree/ostree-repo-file.c

index 51b12d538dd91da0750fb040ecc4431296cae8a8..4985709930973503f615a0094c56b802272f927c 100644 (file)
@@ -719,6 +719,9 @@ query_child_info_dir (OstreeRepo               *repo,
 
   ret_info = g_file_info_new ();
 
+  g_file_info_set_attribute_uint32 (ret_info, "standard::type",
+                                    G_FILE_TYPE_DIRECTORY);
+  
   if (g_file_attribute_matcher_matches (matcher, "unix::mode"))
     {
       if (!ostree_repo_load_variant (repo, OSTREE_OBJECT_TYPE_DIR_META,